Wesley Wiser [Fri, 26 Dec 2014 21:38:25 +0000 (16:38 -0500)]
Export full package version as CARGO_PKG_VERSION
Fixes #1047
bors [Thu, 25 Dec 2014 04:28:40 +0000 (04:28 +0000)]
auto merge of #1089 : bheart/cargo/master, r=alexcrichton
Builds break on recent versions of rustc.
This is in response to rust-lang/rust@
16f01cc - the change was addressed
in rust-lang/rustc-serialize@
1561cca, versioned 0.1.5.
Update dependency accordingly.
Will Tange [Thu, 25 Dec 2014 01:53:32 +0000 (02:53 +0100)]
Update rustc-serialize to 0.1.5
This is in response to rust-lang/rust@
16f01cc - the change was addressed
in rust-lang/rustc-serialize@
1561cca, versioned 0.1.5.
Update dependency to this version.
bors [Thu, 25 Dec 2014 00:13:40 +0000 (00:13 +0000)]
auto merge of #1085 : geomaster/cargo/master, r=alexcrichton
rust-lang/rust#19253 and rust-lang/rust@
25f8051 have introduced changes
to the namespacing within the std::collections::hash_map, breaking some
of Cargo code which imported these.
rust-lang/rust@
cf350ea, implementing changes proposed by RFC #344, have
also broken some code which relies on hash_set::SetItems (now renamed to
hash_set::Iter).
This PR fixes the incompatibilities: imports of
std::collections::hash_map::{Occupied, Vacant} have been replaced by
imports of std::collections::hash_map::Entry::{Occupied, Vacant} and one
instance where the SetItems has been used was replaced by the proper
usage of Iter.
David Davidović [Wed, 24 Dec 2014 20:40:14 +0000 (21:40 +0100)]
Temporary fix for tests
Two tests (test_with_deep_lib_dep and lib_with_standard_name) fail due
to a bug in rustdoc (see rust-lang/rust#20183) so temporarily changing
these so they pass. Be sure to change it back when the fix lands in the
current rust nightly
David Davidović [Wed, 24 Dec 2014 20:37:56 +0000 (21:37 +0100)]
Use std::iter repeat to generate indentation level
David Davidović [Wed, 24 Dec 2014 20:37:01 +0000 (21:37 +0100)]
Avoid logic duplication
As suggested by @alexcrichton, reverted back to the old way of handling
both Job::new and Job::noop that avoids ugly constructs and code
duplication
David Davidović [Wed, 24 Dec 2014 04:51:39 +0000 (05:51 +0100)]
Fix deprecation warnings
Apparently .repeat() for str and .into_string() have been deprecated,
replace them with suggested alternatives
David Davidović [Wed, 24 Dec 2014 04:50:47 +0000 (05:50 +0100)]
Break long lines
...
David Davidović [Wed, 24 Dec 2014 04:50:01 +0000 (05:50 +0100)]
Fix tests
David Davidović [Wed, 24 Dec 2014 04:04:31 +0000 (05:04 +0100)]
Add rustc-serialize dependency to registry
David Davidović [Wed, 24 Dec 2014 03:58:53 +0000 (04:58 +0100)]
Update Cargo.lock for newest dependencies
David Davidović [Wed, 24 Dec 2014 03:27:07 +0000 (04:27 +0100)]
Add Levenshtein distance implementation
Copy lev_distance.rs verbatim from Rust since str::lev_distance has been
deprecated by rust-lang/rust@
9b99436 with no replacement and change code
to use it instead of the deprecated function
David Davidović [Wed, 24 Dec 2014 03:01:23 +0000 (04:01 +0100)]
Update dependency info
Bump to newest versions of several libraries
David Davidović [Wed, 24 Dec 2014 02:56:11 +0000 (03:56 +0100)]
Fix fn type mismatch error
rustc complains that we cannot assign two different fn's to a single
object within an if-else block. I was not able to figure out what causes
this; so deferring the execution of the particular function is a
reasonable fallback. Not very elegant and should be changed to something
with less boilerplate
David Davidović [Wed, 24 Dec 2014 02:53:42 +0000 (03:53 +0100)]
Handle from_utf8 new return type
As per rust-lang/rust@
9b99436, the return type of from_utf8 has been
changed from Option to Result. Consequently, update code which relied on
this return type to work with Ok(...) and Err(...) instead of Some(...)
and None
David Davidović [Wed, 24 Dec 2014 02:48:27 +0000 (03:48 +0100)]
Update references to renamed traits
As per rust-lang/rust@
f8cfd24, rename references to slice::Items to
slice::Iter and slice::MutItems to slice::IterMut
David Davidović [Wed, 24 Dec 2014 02:45:46 +0000 (03:45 +0100)]
Migrate to rustc-serialize
As per rust-lang/rust@
b04bc5c, move all Encodable and Decodable deriving
modes to RustcEncodable and RustcDecodable, and also extern the
rustc-serialize crate instead of the former serialize one.
David Davidović [Tue, 23 Dec 2014 22:06:55 +0000 (23:06 +0100)]
Bump version numbers
Updated to use the latest 2014-12-23 nightly and newest versions of
crates url and docopt.rs
bors [Tue, 23 Dec 2014 03:58:46 +0000 (03:58 +0000)]
auto merge of #1084 : brson/cargo/home, r=alexcrichton
...ar.
I intend to use this to allow many copies of the Rust toolchain to coexist.
My project for managing Rust toolchains: https://github.com/brson/multirust
Brian Anderson [Mon, 22 Dec 2014 21:58:24 +0000 (13:58 -0800)]
Allow the location of `~/.cargo` to be overridden via `CARGO_HOME` env var.
I intend to use this to allow many copies of the Rust toolchain to coexist.
David Davidović [Tue, 23 Dec 2014 02:35:44 +0000 (03:35 +0100)]
Bump required rust version
Latest changes require that we build with a later Rust nightly
David Davidović [Tue, 23 Dec 2014 02:15:56 +0000 (03:15 +0100)]
Update to rust master
rust-lang/rust#19253 and rust-lang/rust@
25f8051 have introduced changes
to the namespacing within the std::collections::hash_map, breaking some
of Cargo code which imported these.
rust-lang/rust@
cf350ea, implementing changes proposed by RFC #344, have
also broken some code which relies on hash_set::SetItems (now renamed to
hash_set::Iter).
This commit fixes the incompatibilities: imports of
std::collections::hash_map::{Occupied, Vacant} have been replaced by
imports of std::collections::hash_map::Entry::{Occupied, Vacant} and one
instance where the SetItems has been used was replaced by the proper
usage of Iter.
bors [Sun, 21 Dec 2014 20:43:45 +0000 (20:43 +0000)]
auto merge of #1079 : alexcrichton/cargo/update-rust, r=alexcrichton
Continuation of #1077
Closes https://github.com/rust-lang/cargo/pull/1079
Alex Crichton [Sun, 21 Dec 2014 18:45:39 +0000 (10:45 -0800)]
Update to rust master
Alex Crichton [Sun, 21 Dec 2014 19:06:09 +0000 (11:06 -0800)]
Merge branch 'pr-btree' of https://github.com/akiss77/cargo into akiss77-pr-btree
bors [Sun, 21 Dec 2014 17:43:45 +0000 (17:43 +0000)]
auto merge of #1078 : alexcrichton/cargo/issue-1071-readme-fix, r=alexcrichton
Alex Crichton [Sun, 21 Dec 2014 17:37:32 +0000 (09:37 -0800)]
Fix readme instructions for submodules
Akos Kiss [Sun, 21 Dec 2014 17:00:39 +0000 (18:00 +0100)]
Use std::collections::{BTreeSet, BTreeMap} instead of std::collections::{TreeSet, TreeMap}.
bors [Sun, 21 Dec 2014 07:28:44 +0000 (07:28 +0000)]
auto merge of #1075 : cmr/cargo/rustc-vverbose, r=alexcrichton
Closes #1073
Corey Richardson [Sun, 21 Dec 2014 06:41:02 +0000 (01:41 -0500)]
Update to new-style rustc CLI args
bors [Sun, 21 Dec 2014 05:51:34 +0000 (05:51 +0000)]
auto merge of #1066 : alexcrichton/cargo/registry-deps, r=alexcrichton
Alex Crichton [Fri, 19 Dec 2014 18:38:32 +0000 (10:38 -0800)]
Update rust and all deps
Alex Crichton [Fri, 19 Dec 2014 03:01:37 +0000 (19:01 -0800)]
Move all deps to the registry
bors [Fri, 19 Dec 2014 21:45:29 +0000 (21:45 +0000)]
auto merge of #1067 : alexcrichton/cargo/fix-registry-update, r=alexcrichton
If a registry already knew about a package, but didn't know about newly
published version of a package, then the registry would occasionally not be
updated when it otherwise needed to be.
Alex Crichton [Fri, 19 Dec 2014 21:43:21 +0000 (13:43 -0800)]
Fix cases where a registry is not updated
If a registry already knew about a package, but didn't know about newly
published version of a package, then the registry would occasionally not be
updated when it otherwise needed to be.
bors [Fri, 19 Dec 2014 16:28:44 +0000 (16:28 +0000)]
auto merge of #1064 : alexcrichton/cargo/snapshots, r=alexcrichton
Should fix the mac bots
Alex Crichton [Fri, 19 Dec 2014 07:03:06 +0000 (23:03 -0800)]
Register new snapshots
Should fix the mac bots
bors [Thu, 18 Dec 2014 17:13:45 +0000 (17:13 +0000)]
auto merge of #1045 : alexcrichton/cargo/update-git2, r=alexcrichton
Should fix #1032 and #1029
Alex Crichton [Fri, 12 Dec 2014 22:44:41 +0000 (14:44 -0800)]
Update git2 and cargo snapshots
Should fix #1032 and #1029
bors [Thu, 18 Dec 2014 01:50:48 +0000 (01:50 +0000)]
auto merge of #1060 : alexcrichton/cargo/pr-1012, r=alexcrichton
Alex Crichton [Thu, 18 Dec 2014 00:32:20 +0000 (16:32 -0800)]
Add a test for PR #1012
Alex Crichton [Thu, 18 Dec 2014 00:09:33 +0000 (16:09 -0800)]
Merge branch 'fix-custom-build-cross' of https://github.com/jmesmon/cargo into pr-1012
bors [Tue, 16 Dec 2014 17:28:49 +0000 (17:28 +0000)]
auto merge of #1057 : alexcrichton/cargo/fix-nightly, r=brson
Older versions of curl apparently don't peel off the query parameters when
looking up filenames, so make two copies of the search results file in hope that
curl will find one of them!
Alex Crichton [Tue, 16 Dec 2014 17:18:40 +0000 (09:18 -0800)]
Fix mac nightly builds
Older versions of curl apparently don't peel off the query parameters when
looking up filenames, so make two copies of the search results file in hope that
curl will find one of them!
bors [Tue, 16 Dec 2014 16:13:50 +0000 (16:13 +0000)]
auto merge of #1053 : sfackler/cargo/master, r=alexcrichton
It's really hard to find out any information about a project if it
doesn't have any of these.
As a bonus I added a shebang to .travis.install.deps.sh so the README
instructions actually work.
Closes #998
Steven Fackler [Mon, 15 Dec 2014 04:43:38 +0000 (20:43 -0800)]
Warn if none of documentation, homepage or repository are provided
It's really hard to find out any information about a project if it
doesn't have any of these.
As a bonus I added a shebang to .travis.install.deps.sh so the README
instructions actually work.
Closes #998
bors [Mon, 15 Dec 2014 16:13:53 +0000 (16:13 +0000)]
auto merge of #1051 : liigo/cargo/print-version-to-stdout, r=alexcrichton
e.g. docopt treat version (and help) as non-fatal error
Fixes #1033
Liigo Zhuang [Mon, 15 Dec 2014 06:17:51 +0000 (14:17 +0800)]
add test: cargo --version
Liigo Zhuang [Mon, 15 Dec 2014 00:41:43 +0000 (08:41 +0800)]
fix fatal condition
Liigo Zhuang [Sun, 14 Dec 2014 13:34:33 +0000 (21:34 +0800)]
print non-fatal errors to stdout instead of stderr
e.g. docopt treat version as non-fatal error
Fixes #1033
bors [Fri, 12 Dec 2014 21:13:52 +0000 (21:13 +0000)]
auto merge of #1042 : cgaebel/cargo/execute-main-with-custom-args, r=alexcrichton
Clark Gaebel [Fri, 12 Dec 2014 20:54:14 +0000 (12:54 -0800)]
Add support for a custom arguments list when running main.
bors [Fri, 12 Dec 2014 04:28:56 +0000 (04:28 +0000)]
auto merge of #1039 : alexcrichton/cargo/update-rust, r=alexcrichton
Alex Crichton [Fri, 12 Dec 2014 04:20:29 +0000 (20:20 -0800)]
Bump rustc version
bors [Thu, 11 Dec 2014 23:28:54 +0000 (23:28 +0000)]
auto merge of #1036 : brson/cargo/flakeywindows, r=alexcrichton
Brian Anderson [Thu, 11 Dec 2014 23:16:43 +0000 (15:16 -0800)]
Sleep before unlinking to fix a flaky test on windows
bors [Thu, 11 Dec 2014 21:28:55 +0000 (21:28 +0000)]
auto merge of #1034 : brson/cargo/rust-installer, r=alexcrichton
This is just a refactoring to put Cargo and Rust on the same installer script.
Brian Anderson [Fri, 21 Nov 2014 23:43:29 +0000 (15:43 -0800)]
Use rust-installer for installation
This is just a refactoring to put Cargo and Rust on the same installer script.
bors [Thu, 11 Dec 2014 19:13:56 +0000 (19:13 +0000)]
auto merge of #1022 : alexcrichton/cargo/std-thread-pool, r=brson
No need to have our own bundled implementation when the standard library
suffices!
bors [Thu, 11 Dec 2014 01:28:58 +0000 (01:28 +0000)]
auto merge of #1024 : alexcrichton/cargo/less-send, r=brson
Alex Crichton [Tue, 9 Dec 2014 18:50:06 +0000 (10:50 -0800)]
Remove lots of no longer necessary + Send annotations
bors [Tue, 9 Dec 2014 17:43:59 +0000 (17:43 +0000)]
auto merge of #1021 : alexcrichton/cargo/issue-986, r=brson
If manual modifications have been made or if cargo/rustc died for some sort of
error, then we don't consider a target as being fresh. If any of the files
output by a target don't end up existing in the target directory (even if the
fingerprint says they do), then we consider the target not fresh.
cc #986
Alex Crichton [Tue, 9 Dec 2014 04:24:27 +0000 (20:24 -0800)]
Migrate to std::sync::TaskPool
No need to have our own bundled implementation when the standard library
suffices!
bors [Tue, 9 Dec 2014 03:58:59 +0000 (03:58 +0000)]
auto merge of #1020 : alexcrichton/cargo/issue-885-round-2, r=brson
Don't return dev-dependencies as dependencies for non-test targets as they're
not actually dependencies!
Alex Crichton [Mon, 8 Dec 2014 22:50:16 +0000 (14:50 -0800)]
Rebuild files if target directory is corrupt
If manual modifications have been made or if cargo/rustc died for some sort of
error, then we don't consider a target as being fresh. If any of the files
output by a target don't end up existing in the target directory (even if the
fingerprint says they do), then we consider the target not fresh.
cc #986
bors [Mon, 8 Dec 2014 21:19:01 +0000 (21:19 +0000)]
auto merge of #1019 : alexcrichton/cargo/issue-991, r=brson
It turns out that the registry was being queried with git dependencies as well,
so this commit alters the core registry not query sources with dependencies that
did not originate from the source.
Closes #991
bors [Mon, 8 Dec 2014 21:03:01 +0000 (21:03 +0000)]
auto merge of #1018 : jakub-/cargo/cargo-search-api-token, r=alexcrichton
Alex Crichton [Mon, 8 Dec 2014 20:34:31 +0000 (12:34 -0800)]
Fix build scripts in dev-dependencies
Don't return dev-dependencies as dependencies for non-test targets as they're
not actually dependencies!
bors [Mon, 8 Dec 2014 20:16:19 +0000 (20:16 +0000)]
auto merge of #1009 : jmesmon/cargo/err-msg-fix, r=alexcrichton
Updates an error message
Jakub Bukaj [Sun, 7 Dec 2014 20:25:32 +0000 (15:25 -0500)]
Do not require an API token for `cargo search`
Jakub Bukaj [Sun, 7 Dec 2014 20:24:36 +0000 (15:24 -0500)]
Update to latest Rust
bors [Mon, 8 Dec 2014 19:36:21 +0000 (19:36 +0000)]
auto merge of #989 : jbcrail/cargo/fix-doc-spelling, r=steveklabnik
I just made minor corrections.
bors [Mon, 8 Dec 2014 19:19:38 +0000 (19:19 +0000)]
auto merge of #1010 : alexcrichton/cargo/mingw, r=brson
This prevents having mismatches between bundled libs and libs on the system
(Cargo requires MinGW to compile regardless).
Alex Crichton [Mon, 8 Dec 2014 17:04:19 +0000 (09:04 -0800)]
Bump libgit2 dep to hopefully fix win32
Alex Crichton [Mon, 8 Dec 2014 06:25:26 +0000 (22:25 -0800)]
Fix updating the registry too often
It turns out that the registry was being queried with git dependencies as well,
so this commit alters the core registry not query sources with dependencies that
did not originate from the source.
Closes #991
Cody P Schafer [Fri, 5 Dec 2014 06:54:33 +0000 (01:54 -0500)]
custom_build: build output goes in the directory for the req, not hard coded to Target
This broke crossbuilds that had Host deps that used custom build
scripts, typically resulting in a failure to link (due to bad
relocations or symbols) the final executable or library.
Probably should have rustc check when generating an rlib that all the
containing objects have the appropriate arch.
Alex Crichton [Thu, 4 Dec 2014 06:57:06 +0000 (22:57 -0800)]
Delete bundled gcc libs on windows
This prevents having mismatches between bundled libs and libs on the system
(Cargo requires MinGW to compile regardless).
bors [Thu, 4 Dec 2014 05:44:10 +0000 (05:44 +0000)]
auto merge of #1008 : jmesmon/cargo/custom_build_kind, r=alexcrichton
This is just to support some nice environment aliases in gcc-rs at the moment.
Cody P Schafer [Wed, 3 Dec 2014 18:09:46 +0000 (13:09 -0500)]
custom_build: add the HOST environment variable
bors [Thu, 4 Dec 2014 02:44:10 +0000 (02:44 +0000)]
auto merge of #990 : alexcrichton/cargo/update-blows-up, r=brson
This is the same as the fix for #951 (fixed by #965). The relevant code was
erroneously looking at the source id when it should instead look at the entire
package id (name/version/source).
bors [Wed, 3 Dec 2014 22:14:13 +0000 (22:14 +0000)]
auto merge of #997 : alexcrichton/cargo/issue-993-attempt, r=brson
If a submodule's head commit doesn't exist, then we should attempt to update it
rather than aborting the updating process. This commit moves a local `try!` into
a `and_then` closure to prevent returning from the outer function to hopefully
catch more cases where the submodule needs to be updated.
cc #993, but I'm not sure if this fixes it
Cody P Schafer [Wed, 3 Dec 2014 20:05:32 +0000 (15:05 -0500)]
We're cargo, not rustc
bors [Wed, 3 Dec 2014 07:59:15 +0000 (07:59 +0000)]
auto merge of #1003 : jmesmon/cargo/update-for-nightly, r=alexcrichton
I'm a bit shaky on the profile.rs changes (`thread_local!` and `RefCell` relplacing `local_data_key!`), do make sure I haven't royally screwed something up there.
Cody P Schafer [Tue, 2 Dec 2014 03:11:20 +0000 (22:11 -0500)]
Update for nightly
I'm a bit shaky on the profile.rs changes (`thread_local!` and `RefCell`
relplacing `local_data_key!`), do make sure I haven't royally screwed
something up there.
Note that I haven't sucessfully run the various test_cargo_cross_compile
tests as I don't have an i686-unknown-linux-gnu rustc sitting around.
bors [Tue, 2 Dec 2014 08:14:14 +0000 (08:14 +0000)]
auto merge of #1000 : jbranchaud/cargo/add-semicolon-to-hello-world-in-docs, r=alexcrichton
Both the `index.md` and `guide.md` files show the hello world program source
(generated by `cargo new`) without a semicolon (`;`) at the end of the
`println!` line. The file generated by `cargo new` does and should have a
semicolon. This commit brings the docs in sync with the generated code.
jbranchaud [Tue, 2 Dec 2014 02:09:44 +0000 (20:09 -0600)]
Add a missing semicolon to the hello world program in the docs.
Both the `index.md` and `guide.md` files show the hello world program source
(generated by `cargo new`) without a semicolon (`;`) at the end of the
`println!` line. The file generated by `cargo new` does and should have a
semicolon. This commit brings the docs in sync with the generated code.
bors [Sun, 30 Nov 2014 08:14:16 +0000 (08:14 +0000)]
auto merge of #995 : alexcrichton/cargo/issue-808, r=huonw
Closes #808
Alex Crichton [Sun, 30 Nov 2014 06:11:33 +0000 (22:11 -0800)]
Bump version number to 0.1.0
Closes #808
Alex Crichton [Sun, 30 Nov 2014 07:40:08 +0000 (23:40 -0800)]
Don't abort on possibly-corrupt submodules
If a submodule's head commit doesn't exist, then we should attempt to update it
rather than aborting the updating process. This commit moves a local `try!` into
a `and_then` closure to prevent returning from the outer function to hopefully
catch more cases where the submodule needs to be updated.
cc #993, but I'm not sure if this fixes it
bors [Sun, 30 Nov 2014 06:59:15 +0000 (06:59 +0000)]
auto merge of #996 : alexcrichton/cargo/issue-953, r=huonw
Closes #953
Alex Crichton [Sun, 30 Nov 2014 06:13:51 +0000 (22:13 -0800)]
Link logo to the main crates.io page
Closes #953
Alex Crichton [Thu, 27 Nov 2014 23:49:16 +0000 (15:49 -0800)]
Handle updates to version requirements in lockfiles
This is the same as the fix for #951 (fixed by #965). The relevant code was
erroneously looking at the source id when it should instead look at the entire
package id (name/version/source).
bors [Thu, 27 Nov 2014 20:59:12 +0000 (20:59 +0000)]
auto merge of #988 : Gekkio/cargo/zsh-run-normal-args, r=alexcrichton
Running a Rust program with some arguments such as files is a common use
case. The ZSH completion did not declare support for extra arguments to
"cargo run", so file completion was impossible. In practice pressing TAB
after writing "cargo run -- " gave no completion at all.
After this patch, cargo run can do "normal completion",
which in practice does file/directory completion. This works nicely
with "cargo run -- ".
Joseph Crail [Thu, 27 Nov 2014 20:57:30 +0000 (15:57 -0500)]
Fix spelling in documentation.
Joonas Javanainen [Thu, 27 Nov 2014 17:00:12 +0000 (19:00 +0200)]
ZSH normal completion for args in "cargo run -- <args>"
Running a Rust program with some arguments such as files is a common use
case. The ZSH completion did not declare support for extra arguments to
"cargo run", so file completion was impossible. In practice pressing TAB
after writing "cargo run -- " gave no completion at all.
After this patch, cargo run can do "normal completion",
which in practice does file/directory completion. This works nicely
with "cargo run -- ".
bors [Tue, 25 Nov 2014 21:59:15 +0000 (21:59 +0000)]
auto merge of #981 : steveklabnik/cargo/remove_color, r=alexcrichton
this version doesn't actually work. Let's make them real.
http://www.reddit.com/r/programming/comments/2mwidh/rusts_central_package_repository_is_up/cm8l8yr?context=3
Steve Klabnik [Tue, 25 Nov 2014 21:34:53 +0000 (16:34 -0500)]
remove references to color
this version doesn't actually work. Let's make them real.
http://www.reddit.com/r/programming/comments/2mwidh/rusts_central_package_repository_is_up/cm8l8yr?context=3
bors [Tue, 25 Nov 2014 17:44:19 +0000 (17:44 +0000)]
auto merge of #974 : alexcrichton/cargo/issue-940, r=wycats
This key will support projects with nonstandard licenses and the registry will
display the license as "nonstandard".
Closes #940
Alex Crichton [Tue, 25 Nov 2014 06:18:54 +0000 (22:18 -0800)]
Add support for a license-file manifest key
This key will support projects with nonstandard licenses and the registry will
display the license as "nonstandard".
Closes #940